package com.my.xq.domain.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.sskj.core.entity.BaseEntity;
import javax.persistence.Transient;

@Entity
@Table(name = "xq_option")
public class Option extends BaseEntity {
	
	/**
	 * 投票方案里面的问卷调查选项
	 */
	private static final long serialVersionUID = 1L;

	@Column(length = 40)
	private String planid;	//对应的投票方案id
	
	@Column
	private int optionorder;	//选项排序,即第几条选项
	
	@Column(length = 400)
	private String detail;	//选项的详细内容
	
	@Column(length = 20)
	private String agree;	//'是'的不同表述,比如'同意'
	
	@Column(length = 20)
	private String disagree;	//'否'的不同表述,比如'不同意'
	
	@Column(name="ayes")
	private int ayes;	//这个选项的赞成票总共有多少票
	
	@Column(name="nays")
	private int nays;	//这个选项的反对票总共有多少票
	
	@Transient
	private List<VoteResult> list;

	@Override
	public String toString() {
		return "Option [planid=" + planid + ", optionorder=" + optionorder + ", detail=" + detail + ", agree=" + agree
				+ ", disagree=" + disagree + ", ayes=" + ayes + ", nays=" + nays + "]";
	}

	public String getPlanid() {
		return planid;
	}

	public void setPlanid(String planid) {
		this.planid = planid;
	}

	public int getOptionorder() {
		return optionorder;
	}

	public void setOptionorder(int optionorder) {
		this.optionorder = optionorder;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getAgree() {
		return agree;
	}

	public void setAgree(String agree) {
		this.agree = agree;
	}

	public String getDisagree() {
		return disagree;
	}

	public void setDisagree(String disagree) {
		this.disagree = disagree;
	}

	public int getAyes() {
		return ayes;
	}

	public void setAyes(int ayes) {
		this.ayes = ayes;
	}

	public int getNays() {
		return nays;
	}

	public void setNays(int nays) {
		this.nays = nays;
	}

	public List<VoteResult> getList() {
		return list;
	}

	public void setList(List<VoteResult> list) {
		this.list = list;
	}
}
